package edu.wtbu.cs.bishe.utils;


import java.security.SecureRandom;

// 1. 验证码生成工具类
public class VerificationCodeGenerator {
    private static final SecureRandom random = new SecureRandom();

    public static String generateCode(int length) {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < length; i++) {
            sb.append(random.nextInt(10));
        }
        return sb.toString();
    }
}